import Vue from 'vue'
import VueQriously from 'vue-qriously'
import 'element-ui/lib/theme-chalk/index.css'//element-ui的css
import { MessageBox } from 'element-ui';
import {
  Container,
  Header,
  Aside,
  Main,
  Menu,
  MenuItem,
  Button,
  Form,
  FormItem,
  Input,
  Dialog, Upload,
  Select, Carousel,
  CarouselItem, Dropdown,
  DropdownMenu, DropdownItem,
  RadioGroup,
  Radio, Col,
  Tag, Image,
  Option, Empty,
  Message,
  Pagination,
  TabPane,
  Checkbox,
  Tabs,
  Row,
  CheckboxGroup,
  Notification,
  Tooltip as ElTooltip,
  Rate as ElRate,
  TimelineItem,
  Card,
  Timeline,
  Link,
  Table,
  TableColumn,
  DatePicker,
  InputNumber,
} from 'element-ui';
import locale from 'element-ui/lib/locale/lang/en';
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;

const components = [
  Container,
  Header,
  Aside,
  Main,
  Menu,
  MenuItem,
  Button,
  Form,
  FormItem,
  Input,
  Dialog, Upload, Select, Carousel, CarouselItem, Dropdown, DropdownMenu, DropdownItem, RadioGroup, Radio, Col,
  Tag, Image,
  Option, Empty,
  Pagination, TabPane, Checkbox,
  Tabs,
  TabPane,
  Row,
  CheckboxGroup,
  Message,
  Notification,
  ElTooltip,
  ElRate,
  TimelineItem,
  Card,
  Timeline,
  Link,
  Table,
  TableColumn,
  DatePicker,
  InputNumber,
];

const Element = {
  install(Vue) {
    components.forEach(component => {
      Vue.component(component.name, component);
    });
  }
};

Vue.use(Element, { locale });
Vue.use(VueQriously)
